package com.haizhi.vp.task;

import com.haizhi.vp.service.WordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.ParseException;

@Component
@Slf4j
public class GenwordTask {

    @Autowired
    private WordService wordService;
//    @Scheduled(cron = "0 0 17 * * ?  ")
    public void update() throws ParseException {

        log.info("开始生成日报告");
        wordService.GenWord();
        log.info("结束生成日报告");
    }
}
